Post

Replies

Boosts

Views

Activity

Reply to writing tEXt chunk data to PNG
Where are you placing your chunk(s). ie after the IHDR chunk and before the IDAT chunk(s), in front of other chunks, etc.? Are you adding them just before saving the data to a file? How are you saving the data (ie pngData(), .writeTo(), etc...) there could a number of reasons... please post your code
Jan ’24
Reply to Why do Let Integer constants change values or always equal Zero?
UPDATE With additional troubleshooting, I see that this is only happening when running on a physical device, and NOT in the simulator. I still need to find another device to test on. But... could there be a compiler setting or some type of timing issue that doesn't allow for some lazy variables to be initialized? (iPAD OS is 14.7.1 on iPad Pro 10.5 inch) (simulator is 14.5 on iPad 9.7)
Sep ’21
Reply to Why do Let Integer constants change values or always equal Zero?
OOPer - The way I was checking (not shown I the video) is by running a (loadStaticVariableTest) function that has variables being assigned the values (ie var localLives = Global.lives.paid, etc... ) and setting a break point at the end of the function (I also checked by setting a break point on another line after calling the loadStaticVariableTest() function in a viewDidLoad event), then checking the values. Is there a way to check init and non-init lazy variables in debug?
Sep ’21
Reply to Why do Let Integer constants change values or always equal Zero?
Yes. The ones I showed in the video were all initialized. How I discovered the problem is that doing an IAP started resulting in no longer getting new lives (the code basically validates the receipt and then adds the (static let variable) to a numberOfLives var variable. It seems that some variables get initialized properly and some don't? I can't think of what could cause this... and it makes no difference if it's done on the main thread or not. Thank you for your help.
Sep ’21